﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.Master" AutoEventWireup="true" 
    CodeBehind="ListarCupom.aspx.cs" Inherits="Ecommerce.Web.Admin.Paginas.ListarCupom" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div id="box_toolbox">
        <div id="div_toolbox_titulo">
            <asp:Label ID="lblTituloMenu" runat="server" Text="Gerenciar Cupons"></asp:Label>
        </div>
        <div id="div_toolbox_botoes">
            <asp:Button ID="btnAdicionar" runat="server" CssClass="Botao_Toolbox" Text="Adicionar" />
        </div>
    </div>
    
    <div id="header">
    
        <table border="0" cellpadding="3" cellspacing="0" width="100%">
            <tr>
                <td style="width:130px"><asp:Label ID="lblCodigo" CssClass="Label_Formulario" runat="server" Text="Código:"></asp:Label></td>
                <td><asp:TextBox ID="txtCodigo" CssClass="Textbox" runat="server"></asp:TextBox></td>
            </tr>
            
            <tr>
                <td><asp:Label ID="lblAtivo" CssClass="Label_Formulario" runat="server" Text="Ativo:"></asp:Label></td>
                <td><asp:CheckBox ID="chkAtivo" runat="server" /></td>
            </tr>
        </table>
        <p>
            <asp:Button ID="btnPesquisar" runat="server" CssClass="Botao_Toolbox" 
                Text="Pesquisar" onclick="btnPesquisar_Click" />
        </p>
    </div>

    <div id="grid">

        <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server" ChildrenAsTriggers="true">
            <ContentTemplate>
                
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <span id='loading' class="Gauge_Posicao">
                            <img src="../Imagens/load_icon.gif" border="0" alt="Carregando..." />
                        </span>
                    </ProgressTemplate>
                </asp:UpdateProgress>

        <asp:GridView ID="grvCupons" runat="server"
            CellPadding="0"
            CellSpacing="0" 
            AutoGenerateColumns="False" 
            Width="100%" 
            GridLines="None"
            HeaderStyle-CssClass="Table_Header"
            AlternatingRowStyle-CssClass="Table_Body_Alternate" 
            RowStyle-CssClass="Table_Body" 
            AllowPaging="True" onpageindexchanging="grvCupons_PageIndexChanging" 
                    onrowdatabound="grvCupons_RowDataBound">
            
            <Columns>  
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Identificador" ReadOnly="True" SortExpression="CustomerID" />  
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Data Criação" SortExpression="CompanyName" />
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Código" SortExpression="CompanyName" />
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Inicio Válidade" ReadOnly="True" SortExpression="CustomerID" />  
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Fim Válidade" SortExpression="CompanyName" />
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Valor" SortExpression="CompanyName" />
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Associado a" SortExpression="CompanyName" />
                <asp:BoundField DataField="cup_idt_cupom" HeaderStyle-HorizontalAlign="Left" HeaderText="Ativo" SortExpression="CompanyName" />
                
                <asp:TemplateField HeaderText="Detalhes" HeaderStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:LinkButton ID="lkbEditar" runat="server">LinkButton</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                
            </Columns>  
        </asp:GridView>

        </ContentTemplate>
    </asp:UpdatePanel>
</div>

</asp:Content>
